import React, { useState } from 'react';
import {Button, Input, Modal, Checkbox} from 'antd';
const { TextArea } = Input;
import Table from "./Table";
import Table2 from "./Table2";
import From from "./form";
import From2 from './form2'
const App = (props) => {
    const [isModalOpen, setIsModalOpen] = useState(false);
    const showModal = () => {
        setIsModalOpen(true);
    };

    const handleOk = () => {
        setIsModalOpen(false);
    };

    const handleCancel = () => {
        setIsModalOpen(false);
    };

    React.useImperativeHandle(props.onRef, () => {
        return {
            showModal: showModal,
        };
    });
    return (
        <>
            <Modal title="批量导入样本" width={1000} open={isModalOpen} onOk={handleOk} onCancel={handleCancel}>
                <div>
                    <From />
                </div>
                <div style={{display: 'flex',spaceBetween: '10px',}}>
                    <div style={{width: '50%',borderRight: '1px solid #ccc'}}>
                        <Table />
                    </div>
                    <div style={{width: '50%'}}>
                        <Table2 />
                    </div>
                </div>

                <div>
                    <From2 />
                </div>
            </Modal>
        </>
    );
};

export default App;
